﻿@{
    ViewBag.Title = "";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

  <input type="hidden" value="@Session[HomeCareLibrary.Constants.SessionConstants.MODE]" id="hdnSessionValueTaskView" />
<script type="text/javascript">
    $(document).ready(function () {
        var hdnSessionValueTaskView = "";

        try {
            hdnSessionValueTaskView = $("#hdnSessionValueTaskView").val();
        }
        catch (ex) {
        }
       
        window.scrollTo(0, 0);
        if ($("#divTasks").html().trim() == '') {
            //for iphoneApp, androidApp, ipadApp we donn't need to show the loader.
            if (hdnSessionValueTaskView == "iphoneApp" || hdnSessionValueTaskView == "androidApp" || hdnSessionValueTaskView == "ipadApp") {
                $("#wait_tasktipsideas").css("display", "none");
            }
            else {
                $("#wait_tasktipsideas").css("display", "block");
            }
           

            $("#divTasks").load("/Mtt/tasks", function () {
                $("#wait_tasktipsideas").css("display", "none");
                if ($(this).html() == '') {
                    window.location.href = "/home/login"
                }
            });

        }
        $("#divbottomtaskstips").show();
        $(".task-tab").show();
        $(".tips-tab, .ideas-tab, .extras-tab, .admin-tab").hide();
        $("#tasksLI").addClass('active').siblings().removeClass('active');
        checkForIphone();
    });

     function checkForIphone() {

       
         if ($("#hdnSessionValueTaskView").val() != '') {
             if ($("#hdnSessionValueTaskView").val() == "@HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP" || $("#hdnSessionValueTaskView").val() == "@HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP") {

                $(".mobileMenu").show();
            }
        }

    }

</script>




